import request from '@/utils/request'

// 创建团队管理-车队信息
export function createFleet(data) {
  return request({
    url: '/team/fleet/create',
    method: 'post',
    data: data
  })
}

export function createBatchFleet(data) {
  return request({
    url: '/team/fleet/createBatch',
    method: 'post',
    data: data
  })
}

// 更新团队管理-车队信息
export function updateFleet(data) {
  return request({
    url: '/team/fleet/update',
    method: 'put',
    data: data
  })
}

// 删除团队管理-车队信息
export function deleteFleet(id) {
  return request({
    url: '/team/fleet/delete?id=' + id,
    method: 'delete'
  })
}

/** 批量删除团队管理-车队信息 */
export function deleteFleetList(ids) {
  return request({
    url: `/team/fleet/delete-list?ids=${ids.join(',')}`,
    method: 'delete'
  })
}

// 获得团队管理-车队信息
export function getFleet(id) {
  return request({
    url: '/team/fleet/get?id=' + id,
    method: 'get'
  })
}

// 获得团队管理-车队信息分页
export function getFleetPage(params) {
  return request({
    url: '/team/fleet/page',
    method: 'get',
    params
  })
}
// 导出团队管理-车队信息 Excel
export function exportFleetExcel(params) {
  return request({
    url: '/team/fleet/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}